package il.ac.bgu.soa2009.hw6.impl;

import java.io.*;
import java.util.LinkedList;
import java.util.List;

/**
 * User: Henry
 * Date: 06/04/2009
 * Time: 10:16:52
 */
public class ServerURIReader {
    public static String[] getServers(String fileName) {
        List<String> resList = new LinkedList<String>();
        try {
            InputStream stream = new FileInputStream(fileName);
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream));
            String line = "";
            while ((line = bufferedReader.readLine()) != null) {
                resList.add(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        String[] res = new String[resList.size()];
        resList.toArray(res);
        return res;
    }
}
